<%@page import="br.com.senac.pi5.comum.ComumBO"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
    <head>
        <title>ADA Airlines</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <!-- Importação dos CSS's -->
        <link rel="stylesheet" href="css/reset.css" type="text/css" media="all">
        <link rel="stylesheet" href="css/layout.css" type="text/css" media="all">
        <link rel="stylesheet" href="css/style.css" type="text/css" media="all">

        <meta name="viewport" content="width=device-width">
    </head>
    <body id="page1">
        <script type="text/javascript" src="js/passagens.js"></script>

        <div class="main">
            <!--header -->
            <header>
                <div class="wrapper">
                    <h1><a href="index.html" id="logo">Air lines</a></h1>
                    <span id="slogan">Voos Rápidos, Frequentes e Seguros</span>
                </div>
                <nav>
                    <ul id="menu">
                        <li><a href="index.html"><span><span>Home</span></span></a></li>
                        <li id="menu_active"><a href="passagens.jsp"><span><span>Passagens</span></span></a></li>
                        <li><a href="incluiCadastro.jsp"><span><span>Cadastre-se</span></span></a></li>
                        <li class="end"><a href="login.jsp"><span><span>Log in</span></span></a></li>
                    </ul>
                </nav>
            </header>
            <!-- / header -->

            <!--content -->
            <section id="content">
                <div class="wrapper pad1">
                    <article class="col1">
                        <div class="pad_bot3">
                            <div class="box1">
                                <h2 class="top">Busca de Passagens</h2>
                                <form id="form_4" method="post" name="ida" action="buscaVoos" onsubmit="return validaCampos(this);">
                                    <div>
                                        <div>
                                            <span class="left">Só ida:</span>
                                            <input type="checkbox" id="escolhaSoIda" onClick="toggle('escolhaSoIda', 'dt_retorno')" >
                                        </div>
                                        <div class="row">
                                            <span class="left">Origem:</span>
                                            <select name="origem" id="origem">
                                                <option value="0">Selecione</option>
                                                <option value="CNF">Belo Horizonte - Confins</option>
                                                <option value="BSB">Brasilia - Presidente Juscelino Kubitschek</option>
                                                <option value="POA">Porto Alegre - Salgado Filho</option> 
                                                <option value="REC">Recife - Gilberto Freyre</option> 
                                                <option value="SDU">Rio de Janeiro - Santos Dumont</option>
                                                <option value="CGH">São Paulo - Congonhas</option>         
                                            </select>
                                        </div>
                                        <div class="row">
                                            <span class="left">Destino:</span>
                                            <select name="destino" id="destino">
                                                <option value="0">Selecione</option>
                                                <option value="CNF">Belo Horizonte - Confins</option>
                                                <option value="BSB">Brasilia - Presidente Juscelino Kubitschek</option>
                                                <option value="POA">Porto Alegre - Salgado Filho</option> 
                                                <option value="REC">Recife - Gilberto Freyre</option> 
                                                <option value="SDU">Rio de Janeiro - Santos Dumont</option>
                                                <option value="CGH">São Paulo - Congonhas</option>    
                                            </select>
                                        </div>
                                        <div class="row">
                                            <span class="left">Data de partida:</span>
                                            <input type="text" placeholder="DD/MM/AAAA" maxlength="10" id="dt_partida" name="dt_partida"  onkeyup="
                                                    var v = this.value;
                                                    if (v.match(/^\d{2}$/) !== null) {
                                                        this.value = v + '/';
                                                    } else if (v.match(/^\d{2}\/\d{2}$/) !== null) {
                                                        this.value = v + '/';
                                                    }" maxlength="10">
                                        </div>
                                        <div class="row">
                                            <span class="left">Data de retorno:</span><input type="text" id="dt_retorno" name="dt_retorno"  placeholder="DD/MM/AAAA" onkeyup="
                                                    var v = this.value;
                                                    if (v.match(/^\d{2}$/) !== null) {
                                                        this.value = v + '/';
                                                    } else if (v.match(/^\d{2}\/\d{2}$/) !== null) {
                                                        this.value = v + '/';
                                                    }" maxlength="10">
                                        </div>
                                        <div class="row">
                                            <span class="left">Adultos:</span>
                                            <input type="text" class="input2" maxlength="1" id="adultos" name="adultos" value="1">
                                        </div>
                                        <div class="row">
                                            <span class="left">Crianças:</span>
                                            <input type="text" class="input2" maxlength="1" id="criancas" name="criancas" value="0">
                                            <span class="pad_left1">(2-11 anos)</span>
                                        </div>
                                        <div class="row">
                                            <span class="left">Bebês:</span>
                                            <input type="text" class="input2" maxlength="1" id="bebes" name="bebes" value="0">
                                            <span class="pad_left1">(0-23 meses)</span>
                                        </div>
                                        <div class="row">
                                            <span class="left">Codigo Promocional:</span>
                                            <input type="text" class="input" maxlength="6" id="cd_promo" name="cd_promo">
                                        </div>
                                        <br>
                                        <button type="submit" id="pesquisar" class="button1" >Pesquisar</button>
                                    </div>
                                </form>
                            </div>
                        </div>  
                    </article>
                </div>
            </section>
            <!--content end-->

            <!--footer -->
            <footer>
                <div class="wrapper">
                    <div class="links">
                        Produzido por IT Enterprises.
                    </div
                </div>
            </footer>
            <!--footer end-->

        </div>
    </body>
</html>